package com.hsoft.zhxy.generator;

import com.baomidou.mybatisplus.annotation.DbType;

/**
 * 自动化代码生成工具
 * 根据zhxy-if3.0-2020所需要的工程结构，对mybatis-plus generator进行自定义封装
 * 2020/10/29 mlingwei
 */
public class Run {


    /**********************代码生成器配置-开始**********************/

    // 数据库类型及驱动
    private final static DbType dbType      = DbType.ORACLE;
    private final static String driver      = "oracle.jdbc.driver.OracleDriver";

    // 数据库连接信息
    private final static String dbUrl       = "jdbc:oracle:thin:@192.168.28.112:9999:gxsjzx2";
    private final static String userName    = "HIT_DEMO3";
    private final static String password    = "hitdemo3";

    // 小应用名
    private final static String moduleName  = "xtgl_02_01";

    // 指定生成的表名,使用逗号分隔: "JCQX_YH", "demo"
    private final static String[] tableNames = new String[] {

            "JCQX_YH",
            "JCQX_BM",
            "JCGG_XTCS",
            "JCQX_JS"

    };

    /**********************代码生成器配置-结束**********************/


    // 程序入口
    public static void main(String[] args) {
        MyBatisGenerator.generateByTables(dbType, driver, dbUrl, userName, password, moduleName, tableNames);
    }

}
